package com.boot;

import com.boot.config.UpConfig;
import com.boot.domain.Info;
import com.boot.domain.Student;
import com.boot.domain.Teacher;
import com.boot.domain.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ApplicationContext;

/**
 * @author
 * @date 2025-07-29
 * @Description
 */
public class MainApplication {
    public static void main(String[] args) {
        //启动spring框架，必须指定一个配置 （配置类）
        ApplicationContext run = SpringApplication.run(UpConfig.class);

        Info info = run.getBean(Info.class);
        User user = run.getBean(User.class);
        Teacher teacher = run.getBean(Teacher.class);
        Student student = run.getBean(Student.class);
        System.out.println(info);
        System.out.println(user);
        System.out.println(student);
        System.out.println(teacher);
    }
}
